//
//  FindGetPostlistApi.m
//  CoollangTennisBall
//
//  Created by Coollang on 2017/9/11.
//  Copyright © 2017年 Coollang-YF. All rights reserved.
//

#import "MomentsTopicApi.h"



@interface MomentsTopicApi ()


@property (nonatomic, strong) NSDictionary *params;

@end
@implementation MomentsTopicApi

- (instancetype)initWithReqType:(kMomentApiType)reqType params:(NSDictionary *)params {
    if (self = [super init]) {
        self.reqType = reqType;
        self.params = params;
    }
    return self;
}

- (NSString *)requestUrl {
    switch (self.reqType) {
        case kGetTopicListApi:
            return @"Tsns/getPostList";
            break;
        case kTopicCommentApi:
            return @"/Tsns/response";
            break;
        case kTopicLikeApi:
            return @"Tsns/postLike";
            break;
        case kTopicCancelLikeApi:
            return @"Tsns/delPostLike";
            break;
        case kDeleteTopicApi:
            return @"Tsns/delPost";
            break;
        case kDeleteTopicCommentApi:
            return @"Tsns/delPostResponse";
            break;
        default:
            return nil;
            break;
    }
}

- (id)requestArgument {
    return self.params;
}

- (NSInteger)cacheTimeInSeconds {
    if (kGetTopicListApi) {
        return 60;
    }else {
        return [super cacheTimeInSeconds];
    }
}


@end
